function myinstanceof(L,R) {

    while(L !== null) {
    L = L.__proto__
    if (L.__proto__ === R.prototype) {
        return true
    }
    }   
    return false
}
console.log(myinstanceof([], Array));
 //true

 console.log('hello' instanceof String);//
 